/**
 * MyProductSearchEvent.java
 * 
 * Project: GWBS2009
 * 
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2007-2010 Shanghai Auto-Parts E-Procurement Co., Ltd.
 *        All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        APEP Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with APEP.
 *
 * Warning:
 * =============================================================================
 *
 */
package system.base;

import java.util.StringTokenizer;

import com.hitrust.gs.lib.GSBaseConstants;

import framework.core.Conditions;
import framework.core.SearchEvent;
import framework.core.Value;

public class MyProductSearchEvent extends SearchEvent {

	private String m_key_word = "";
	private String m_id = "" ; // all

	private String m_concentricity_code = "" ; // all

	private String m_apep_code = "" ; // all

	private String m_name = "" ; // all

	private String m_category_code = "" ; // all

	private String m_product_brand = "" ; // all

	private String m_model = "" ; // all

	private String m_spec = "" ; // all

	private double m_unit_price = Value.NULL_DOUBLE ; // all

	private String m_product_unit = "" ; // all

	private String m_quality_assure_period = "" ; // all

	private String m_manufaturer = "" ; // all

	private String m_area = "" ; // all

	private String m_provider_code = "" ; // all

	private String m_adapt_machine_type = "" ; // all

	private String m_pic = "" ; // all

	private String m_recent_adjustprice_date = "" ; // all

	private double m_recent_adjusted_price = Value.NULL_DOUBLE ; // all

	private String m_recorder_id = "" ; // all

	private String m_record_date = "" ; // all

	private String m_is_tradeflat_product = "" ; // all

	private String m_appender_property = "" ; // all

	private String m_remark = "" ; // all

	private String m_drawing_piece_code = "" ; // all

	private String m_balance_mode = "" ; // all

	private String m_is_normal = "" ; // all

	private String m_warehouse_code = "" ; // all

	private String m_warehouse_name = "" ; // all

	private String m_is_buy = "" ; // all

	private String m_status = "" ; // all

	private String m_auditing_status = "" ; // all

	private boolean is_auditing = false;

	private String m_create_user_id = "" ; // all

	private String m_create_user = "" ; // all

	private String m_create_time = "" ; // all

	private String m_last_update_user_id = "" ; // all

	private String m_last_update_user = "" ; // all

	private String m_last_update_time = "" ; // all
	//private String i_mhcx="";

	private String m_create_time_start = "";

	private String m_create_time_end = "";

	//2009-05-22
	private String m_provider_status = "";


	// 2010-06-22
	private int currentUserId = Value.NULL_INT;
	private String currentWarehouseCode = "";


	public MyProductSearchEvent()
	{
		super();

		setOrderField("T_PRODUCT.ID");

	}


	public int getCurrentUserId() {
		return currentUserId;
	}
	public void setCurrentUserId(int currentUserId) {
		this.currentUserId = currentUserId;
	}

	public String getCurrentWarehouseCode() {
		return currentWarehouseCode;
	}
	public void setCurrentWarehouseCode(String currentWarehouseCode) {
		this.currentWarehouseCode = currentWarehouseCode;
	}

	public String getId()
	{
		return m_id ;
	}
	public void setId(String v)
	{
		m_id = v;
	}

	public String getConcentricityCode()
	{
		return m_concentricity_code ;
	}
	public void setConcentricityCode(String v)
	{
		m_concentricity_code = v;
	}

	public String getApepCode()
	{
		return m_apep_code ;
	}
	public void setApepCode(String v)
	{
		m_apep_code = v;
	}

	public String getName()
	{
		return m_name ;
	}
	public void setName(String v)
	{
		m_name = v;
	}

	public String getCategoryCode()
	{
		return m_category_code ;
	}
	public void setCategoryCode(String v)
	{
		m_category_code = v;
	}

	public String getProductBrand()
	{
		return m_product_brand ;
	}
	public void setProductBrand(String v)
	{
		m_product_brand = v;
	}

	public String getModel()
	{
		return m_model ;
	}
	public void setModel(String v)
	{
		m_model = v;
	}

	public String getSpec()
	{
		return m_spec ;
	}
	public void setSpec(String v)
	{
		m_spec = v;
	}

	public double getUnitPrice()
	{
		return m_unit_price ;
	}
	public void setUnitPrice(double v)
	{
		m_unit_price = v;
	}

	public String getProductUnit()
	{
		return m_product_unit ;
	}
	public void setProductUnit(String v)
	{
		m_product_unit = v;
	}

	public String getQualityAssurePeriod()
	{
		return m_quality_assure_period ;
	}
	public void setQualityAssurePeriod(String v)
	{
		m_quality_assure_period = v;
	}

	public String getManufaturer()
	{
		return m_manufaturer ;
	}
	public void setManufaturer(String v)
	{
		m_manufaturer = v;
	}

	public String getArea()
	{
		return m_area ;
	}
	public void setArea(String v)
	{
		m_area = v;
	}

	public String getProviderCode()
	{
		return m_provider_code ;
	}
	public void setProviderCode(String v)
	{
		m_provider_code = v;
	}

	public String getAdaptMachineType()
	{
		return m_adapt_machine_type ;
	}
	public void setAdaptMachineType(String v)
	{
		m_adapt_machine_type = v;
	}

	public String getPic()
	{
		return m_pic ;
	}
	public void setPic(String v)
	{
		m_pic = v;
	}

	public String getRecentAdjustpriceDate()
	{
		return m_recent_adjustprice_date ;
	}
	public void setRecentAdjustpriceDate(String v)
	{
		m_recent_adjustprice_date = v;
	}

	public double getRecentAdjustedPrice()
	{
		return m_recent_adjusted_price ;
	}
	public void setRecentAdjustedPrice(double v)
	{
		m_recent_adjusted_price = v;
	}

	public String getRecorderId()
	{
		return m_recorder_id ;
	}
	public void setRecorderId(String v)
	{
		m_recorder_id = v;
	}

	public String getRecordDate()
	{
		return m_record_date ;
	}
	public void setRecordDate(String v)
	{
		m_record_date = v;
	}

	public String getIsTradeflatProduct()
	{
		return m_is_tradeflat_product ;
	}
	public void setIsTradeflatProduct(String v)
	{
		m_is_tradeflat_product = v;
	}

	public String getAppenderProperty()
	{
		return m_appender_property ;
	}
	public void setAppenderProperty(String v)
	{
		m_appender_property = v;
	}

	public String getRemark()
	{
		return m_remark ;
	}
	public void setRemark(String v)
	{
		m_remark = v;
	}

	public String getDrawingPieceCode()
	{
		return m_drawing_piece_code ;
	}
	public void setDrawingPieceCode(String v)
	{
		m_drawing_piece_code = v;
	}

	public String getBalanceMode()
	{
		return m_balance_mode ;
	}
	public void setBalanceMode(String v)
	{
		m_balance_mode = v;
	}

	public String getIsNormal()
	{
		return m_is_normal ;
	}
	public void setIsNormal(String v)
	{
		m_is_normal = v;
	}

	public String getWarehouseCode()
	{
		return m_warehouse_code ;
	}
	public void setWarehouseCode(String v)
	{
		m_warehouse_code = v;
	}

	public String getWarehouseName()
	{
		return m_warehouse_name ;
	}
	public void setWarehouseName(String v)
	{
		m_warehouse_name = v;
	}

	public String getIsBuy()
	{
		return m_is_buy ;
	}
	public void setIsBuy(String v)
	{
		m_is_buy = v;
	}

	public String getStatus()
	{
		return m_status ;
	}
	public void setStatus(String v)
	{
		m_status = v;
	}

	public String getAuditingStatus()
	{
		return m_auditing_status ;
	}
	public void setAuditingStatus(String v)
	{
		m_auditing_status = v;
	}


	public String getCreateUserId()
	{
		return m_create_user_id ;
	}
	public void setCreateUserId(String v)
	{
		m_create_user_id = v;
	}

	public String getCreateUser()
	{
		return m_create_user ;
	}
	public void setCreateUser(String v)
	{
		m_create_user = v;
	}

	public String getCreateTime()
	{
		return m_create_time ;
	}
	public void setCreateTime(String v)
	{
		m_create_time = v;
	}

	public String getLastUpdateUserId()
	{
		return m_last_update_user_id ;
	}
	public void setLastUpdateUserId(String v)
	{
		m_last_update_user_id = v;
	}

	public String getLastUpdateUser()
	{
		return m_last_update_user ;
	}
	public void setLastUpdateUser(String v)
	{
		m_last_update_user = v;
	}

	public String getLastUpdateTime()
	{
		return m_last_update_time ;
	}
	public void setLastUpdateTime(String v)
	{
		m_last_update_time = v;
	}

	public String getCreateTimeStart()
	{
		return m_create_time_start;
	}
	public void setCreateTimeStart(String v)
	{
		m_create_time_start = v;
	}

	public String getCreateTimeEnd()
	{
		return m_create_time_end;
	}
	public void setCreateTimeEnd(String v)
	{
		m_create_time_end = v;
	}

	public void setKeyWord(String v)
	{
		m_key_word = v;
	}

	public String getProviderStatus()
	{
		return m_provider_status;
	}
	public void setProviderStatus(String v)
	{
		m_provider_status = v;
	}


	public String viewId() throws Exception
	{
		return Value.view(getId());
	}

	public String viewConcentricityCode() throws Exception
	{
		return Value.view(getConcentricityCode());
	}

	public String viewApepCode() throws Exception
	{
		return Value.view(getApepCode());
	}
	/* public String viewI_mhcx()throws Exception{
     return Value.view(getI_mhcx());
 }
	 */
	public String viewName() throws Exception
	{
		return Value.view(getName());
	}

	public String viewCategoryCode() throws Exception
	{
		return Value.view(getCategoryCode());
	}

	public String viewProductBrand() throws Exception
	{
		return Value.view(getProductBrand());
	}

	public String viewModel() throws Exception
	{
		return Value.view(getModel());
	}

	public String viewSpec() throws Exception
	{
		return Value.view(getSpec());
	}

	public String viewUnitPrice() throws Exception
	{
		return Value.view(getUnitPrice());
	}

	public String viewProductUnit() throws Exception
	{
		return Value.view(getProductUnit());
	}

	public String viewQualityAssurePeriod() throws Exception
	{
		return Value.view(getQualityAssurePeriod());
	}

	public String viewManufaturer() throws Exception
	{
		return Value.view(getManufaturer());
	}

	public String viewArea() throws Exception
	{
		return Value.view(getArea());
	}

	public String viewProviderCode() throws Exception
	{
		return Value.view(getProviderCode());
	}

	public String viewAdaptMachineType() throws Exception
	{
		return Value.view(getAdaptMachineType());
	}

	public String viewPic() throws Exception
	{
		return Value.view(getPic());
	}

	public String viewRecentAdjustpriceDate() throws Exception
	{
		return Value.view(getRecentAdjustpriceDate());
	}

	public String viewRecentAdjustedPrice() throws Exception
	{
		return Value.view(getRecentAdjustedPrice());
	}

	public String viewRecorderId() throws Exception
	{
		return Value.view(getRecorderId());
	}

	public String viewRecordDate() throws Exception
	{
		return Value.view(getRecordDate());
	}

	public String viewIsTradeflatProduct() throws Exception
	{
		return Value.view(getIsTradeflatProduct());
	}

	public String viewAppenderProperty() throws Exception
	{
		return Value.view(getAppenderProperty());
	}

	public String viewRemark() throws Exception
	{
		return Value.view(getRemark());
	}

	public String viewDrawingPieceCode() throws Exception
	{
		return Value.view(getDrawingPieceCode());
	}

	public String viewBalanceMode() throws Exception
	{
		return Value.view(getBalanceMode());
	}

	public String viewIsNormal() throws Exception
	{
		return Value.view(getIsNormal());
	}

	public String viewWarehouseCode() throws Exception
	{
		return Value.view(getWarehouseCode());
	}

	public String viewWarehouseName() throws Exception
	{
		return Value.view(getWarehouseName());
	}

	public String viewIsBuy() throws Exception
	{
		return Value.view(getIsBuy());
	}

	public String viewStatus() throws Exception
	{
		return Value.view(getStatus());
	}

	public String viewAuditingStatus() throws Exception
	{
		return Value.view(getAuditingStatus());
	}

	public String viewCreateUserId() throws Exception
	{
		return Value.view(getCreateUserId());
	}

	public String viewCreateUser() throws Exception
	{
		return Value.view(getCreateUser());
	}

	public String viewCreateTime() throws Exception
	{
		return Value.view(getCreateTime());
	}

	public String getKeyWord()
	{
		return m_key_word;
	}
	public String viewKeyWord() throws Exception
	{
		return Value.view(getKeyWord());
	}
	public String viewLastUpdateUserId() throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}

	public String viewLastUpdateUser() throws Exception
	{
		return Value.view(getLastUpdateUser());
	}

	public String viewLastUpdateTime() throws Exception
	{
		return Value.view(getLastUpdateTime());
	}

	public String viewCreateTimeStart() throws Exception
	{
		return Value.view(getCreateTimeStart());
	}

	public String viewCreateTimeEnd() throws Exception
	{
		return Value.view(getCreateTimeEnd());
	}

	public String viewProviderStatus()
	{
		return Value.view(getProviderStatus());
	}


	public Conditions toConditions() throws Exception
	{
		Conditions c = super.toConditions();

		c.add(getCondition(Product.ID,getId()));

		c.add(getCondition(Product.CONCENTRICITY_CODE,getConcentricityCode()));

		c.add(getCondition(Product.APEP_CODE,getApepCode()));

		c.add(getCondition(Product.NAME,getName()));
		//c.add(getCondition(Product.STATUS, "1"));
		//c.add(getCondition(Product.CATEGORY_CODE,getCategoryCode()));
		//分类编码查询
		String categorycode3 = getGrandfatherCategoryCode();
		String categorycode2 = getUpperCategoryCode();
		String categorycode1 = getCategoryCode();
		if (categorycode3== null || categorycode3.equalsIgnoreCase("null") || categorycode3.equalsIgnoreCase(""))
		{
			categorycode3 = "";
			setGrandfatherCategoryCode(categorycode3);
		}
		if (categorycode2== null || categorycode2.equalsIgnoreCase("null") || categorycode2.equalsIgnoreCase(""))
		{
			categorycode2 = "";
			setUpperCategoryCode(categorycode2);
		}
		if (categorycode1== null || categorycode1.equalsIgnoreCase("null") || categorycode1.equalsIgnoreCase(""))
		{
			categorycode1 = "";
			setCategoryCode(categorycode1);
		}
		if (!categorycode1.equals(""))
		{
			c.add(getCondition(Product.CATEGORY_CODE,categorycode1));
		}
		else if (!categorycode2.equals(""))
		{
			c.add(Product.CATEGORY_CODE + " in (select code from t_product_category where CATEGORY_ID2= ? or code=? )",Conditions.CUSTOM,new String[]{categorycode2,categorycode2});
		}
		else if (!categorycode3.equals(""))
		{

			c.add(Product.CATEGORY_CODE + " in (select code from t_product_category where CATEGORY_ID1= ? or code=? )",Conditions.CUSTOM,new String[]{categorycode3,categorycode3});
		}

		c.add(getCondition(Product.PRODUCT_BRAND,getProductBrand()));

		c.add(getCondition(Product.MODEL,getModel()));

		c.add(getCondition(Product.SPEC,getSpec()));

		c.add(getCondition(Product.UNIT_PRICE,getUnitPrice()));

		c.add(getCondition(Product.PRODUCT_UNIT,getProductUnit()));

		c.add(getCondition(Product.QUALITY_ASSURE_PERIOD,getQualityAssurePeriod()));

		c.add(getCondition(Product.MANUFATURER,getManufaturer()));

		c.add(getCondition(Product.AREA,getArea()));

		//c.add(getCondition(Product.PROVIDER_CODE,getProviderCode()));
		String providerSql = " in (select code from t_provider where 1=1 ";
		boolean providerFlag = false;
		int keycount = 0;
		if (!getProviderCode().equals(""))
		{
			providerSql += "and name = ? ";
			providerFlag = true;
			keycount++;
			//c.add(Product.PROVIDER_CODE + " in (select code from t_provider where name= ? )",Conditions.CUSTOM,getProviderCode());
			//c.add(Product.PROVIDER_CODE,Conditions.IN,getProviderCodes());
		}
		if(!getProviderStatus().equals("")){
			providerSql += "and status = ? ";
			providerFlag = true;
			keycount++;
		}
		String[] pkey = new String[keycount];
		for(int i = 0; i < pkey.length; i++){
			pkey[i] = "";
		}
		if(providerFlag){
			providerSql += ")";
			if(!getProviderCode().equals("")){
				for(int i = 0; i < pkey.length; i++){
					if(pkey[i].equals("")){
						pkey[i] = getProviderCode();
						break;
					}
				}
			}
			if(!getProviderStatus().equals("")){
				for(int i = 0; i < pkey.length; i++){
					if(pkey[i].equals("")){
						pkey[i] = getProviderStatus();
						break;
					}
				}
			}

			c.add(Product.PROVIDER_CODE + providerSql, Conditions.CUSTOM, pkey);
		}


		c.add(getCondition(Product.ADAPT_MACHINE_TYPE,getAdaptMachineType()));

		c.add(getCondition(Product.PIC,getPic()));

		c.add(getCondition(Product.RECENT_ADJUSTPRICE_DATE,getRecentAdjustpriceDate()));

		c.add(getCondition(Product.RECENT_ADJUSTED_PRICE,getRecentAdjustedPrice()));

		c.add(getCondition(Product.RECORDER_ID,getRecorderId()));

		c.add(getCondition(Product.RECORD_DATE,getRecordDate()));

		c.add(getCondition(Product.IS_TRADEFLAT_PRODUCT,getIsTradeflatProduct()));

		c.add(getCondition(Product.APPENDER_PROPERTY,getAppenderProperty()));

		c.add(getCondition(Product.REMARK,getRemark()));

		c.add(getCondition(Product.DRAWING_PIECE_CODE,getDrawingPieceCode()));

		c.add(getCondition(Product.BALANCE_MODE,getBalanceMode()));

		c.add(getCondition(Product.IS_NORMAL,getIsNormal()));

		if(getWarehouseCode() == null || "".equals(getWarehouseCode())){
			c.add("T_PRODUCT.WAREHOUSE_CODE = ?", Conditions.CUSTOM, "00");
		}
		else{
			StringTokenizer st = new StringTokenizer(getWarehouseCode(), "|");
			String code = "";
			int count = 0;
			while(st.hasMoreElements()){
				code = st.nextToken();
				count++;
			}
			if("00".equals(code)){
				c.add("T_PRODUCT.WAREHOUSE_CODE like ?", Conditions.CUSTOM, "00%");
			}
			else{
				if(count > 1){
					String[] key = new String[2];
					key[0] = "00";
					key[1] = code + "%";
					c.add("(T_PRODUCT.WAREHOUSE_CODE = ? OR T_PRODUCT.WAREHOUSE_CODE like ?)", Conditions.CUSTOM, key);
				}
				else{
					c.add("T_PRODUCT.WAREHOUSE_CODE like ?", Conditions.CUSTOM, code + "%");
				}
			}
		}
		isAuditing(c);

		//if("00".equals(getWarehouseCode())){
		//    c.add("WAREHOUSE_CODE = ?", Conditions.CUSTOM, getWarehouseCode());
		//}
		//if(!"00".equals(getWarehouseCode())){
		//    String key[] = new String[]{"00", getWarehouseCode() + "%"};
		//    c.add("(WAREHOUSE_CODE = ? OR WAREHOUSE_CODE like ?)", Conditions.CUSTOM, key);
		//}

		c.add(getCondition(Product.WAREHOUSE_NAME,getWarehouseName()));

		c.add(getCondition(Product.IS_BUY,getIsBuy()));

		c.add(getCondition(Product.STATUS,getStatus()));

		c.add(getCondition(Product.AUDITING_STATUS,getAuditingStatus()));

		c.add(getCondition(Product.CREATE_USER_ID,getCreateUserId()));

		c.add(getCondition(Product.CREATE_USER,getCreateUser()));

		c.add(getCondition(Product.CREATE_TIME,getCreateTime()));

		c.add(getCondition(Product.LAST_UPDATE_USER_ID,getLastUpdateUserId()));

		c.add(getCondition(Product.LAST_UPDATE_USER,getLastUpdateUser()));

		c.add(getCondition(Product.LAST_UPDATE_TIME,getLastUpdateTime()));
		//c.add("NAME like '%"+getI_mhcx()+"%' or CONCENTRICITY_CODE like '%"+getI_mhcx()+"%'" +
		// "or MODEL like '%"+getI_mhcx()+"%' or SPEC like '%"+getI_mhcx()+"%' or PRODUCT_BRAND like '%"+getI_mhcx()+"%' or MANUFATURER like '%"+getI_mhcx()+"%'",Conditions.CUSTOM,getI_mhcx());

		//关键字
		// modify by wangp 2007-07-30
		if (!getKeyWord().equalsIgnoreCase(""))
		{
			//c.add(" 1=1 ");
			String[] keyWord = new String[7];
			keyWord[0] = "%" + viewKeyWord().toUpperCase() + "%";
			keyWord[1] = viewKeyWord().toUpperCase();
			keyWord[2] = "%" + viewKeyWord().toUpperCase() + "%";
			keyWord[3] = "%" + viewKeyWord().toUpperCase() + "%";
			keyWord[4] = "%" + viewKeyWord().toUpperCase() + "%";
			keyWord[5] = "%" + viewKeyWord().toUpperCase() + "%";
			keyWord[6] = "%"+viewKeyWord().toUpperCase()+"%";
			//keyWord[7] = "%" + viewKeyWord().toUpperCase() + "%";

			c.add("( NAME like ? or CONCENTRICITY_CODE = ? or MODEL like ? " +
					"or SPEC like ? or PRODUCT_BRAND like ? or MANUFATURER like ?"+"or APPENDER_PROPERTY like ? )",Conditions.CUSTOM,keyWord);
			//            "or exists (select t_customer_code.item_id from t_customer_code where t_item.id = t_customer_code.item_id and t_customer_code.PUR_ID = "+ getSearchProductPurId() + " and upper(t_customer_code.customer_code) like ? ))");
		}

		if(!getCreateTimeStart().equalsIgnoreCase(""))
		{
			c.add(" CREATE_TIME >= ?", Conditions.CUSTOM, getCreateTimeStart() + " 00:00:00");
		}

		if(!getCreateTimeEnd().equalsIgnoreCase(""))
		{
			c.add(" CREATE_TIME <= ?", Conditions.CUSTOM, getCreateTimeEnd() + " 23:59:59");
		}

		// 加入我的产品用户限制 2010-06-22 wangp
		if(getCurrentWarehouseCode() != null && getCurrentWarehouseCode().length() > 0) {
			c.add(" T_MY_PRODUCT.WAREHOUSE_CODE like ?", Conditions.CUSTOM, getCurrentWarehouseCode() + "%");
		}
		// end 加入我的产品用户限制

		return c ;
	}



	/**
	 * @param c
	 * @throws Exception
	 */
	private void isAuditing(Conditions c) throws Exception {
		if(is_auditing){
			String [] warehouseCodes = GSBaseConstants.WAREHOUSTS_NO_AUDITING;
			if(warehouseCodes.length>0){
				for(int k=0;k<warehouseCodes.length;k++){
					if(!warehouseCodes[k].trim().equals("")){
						c.add("WAREHOUSE_CODE <>  ?", Conditions.CUSTOM, warehouseCodes[k]);
					}
				}
			}
		}
	}

	private String[] m_provider_codes = null;

	public String[] getProviderCodes()
	{
		return m_provider_codes ;
	}
	public void setProviderCodes(String[] v)
	{
		m_provider_codes = v;
	}

	private String[] m_category_codes = null;

	public String [] getCategoryCodes(){
		return m_category_codes;
	}
	public void setCategoryCodes(String [] v){
		m_category_codes = v;
	}

	//add by chengbiao.he end

	// add by Jackey start
	private String m_upper_category_code = "";
	public String getUpperCategoryCode()
	{
		return m_upper_category_code ;
	}
	public void setUpperCategoryCode(String v)
	{
		m_upper_category_code = v;
	}
	public String viewUpperCategoryCode() throws Exception
	{
		return Value.view(getUpperCategoryCode());
	}

	private String m_grandfather_category_code = "";
	public String getGrandfatherCategoryCode()
	{
		return m_grandfather_category_code ;
	}
	public void setGrandfatherCategoryCode(String v)
	{
		m_grandfather_category_code = v;
	}
	public String viewGrandfatherCategoryCode() throws Exception
	{
		return Value.view(getGrandfatherCategoryCode());
	}
	// add by Jackey end

	// add by wing start
	private String[] m_product_codes = null;

	public String[] getProductCodes()
	{
		return m_product_codes ;
	}
	public void setProductCodes(String[] v)
	{
		m_product_codes = v;
	}
	// add by wing end



	/**
	 * @return the is_auditing
	 */
	public boolean isIs_auditing() {
		return is_auditing;
	}



	/**
	 * @param aIs_auditing the is_auditing to set
	 */
	public void setIs_auditing(boolean aIs_auditing) {
		is_auditing = aIs_auditing;
	}

}
